﻿@{
    ViewBag.Title = "订单查询列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.nbGridFor<DishOrder>(s =>
 {
     s.Action("List");
     s.DefaultSortOption("OrderDate", GridSortOrder.Desc);
     s.Columns(c =>
     {
         c.Bind(m => m.Id).IsKey();
         c.BindDateTime(m => m.OrderDate).AsSearch();
         c.Bind(m => m.SiteName).Width(60);
         c.Bind(m => m.OrderType).Width(60);
         c.Bind(m => m.TotalCost).Width(50).Align(GridAlign.Right);
         c.Bind(m => m.ItemDesc).Width("auto").Align(GridAlign.Left).AsQuery().AsSearch();
         c.Bind(m => m.State).Width(50).AsSearch();
         c.Bind(m => m.ReportUserName).Width(60);
         c.BindDateTime(m => m.ReportDate).AsSearch();
         c.BindTemplate(80)
           .Template(@<a href="@Url.OpenDialog(Url.Action("Edit", new { Id = "${Id}" }), "查看明细（${SiteName}）", new { height = 600 })" class="imgbtn2" ><span
               class="accept">查看明细</span></a>);
     });
 }))